#!/bin/sh 
#
# $Id$

cd %OPTWARE_TARGET_PREFIX%/share/nethackdir/dat
../util/dgn_comp dungeon.pdf
../util/lev_comp bigroom.des
../util/lev_comp castle.des
../util/lev_comp endgame.des
../util/lev_comp gehennom.des
../util/lev_comp knox.des
../util/lev_comp medusa.des
../util/lev_comp mines.des
../util/lev_comp oracle.des
../util/lev_comp sokoban.des
../util/lev_comp tower.des
../util/lev_comp yendor.des
../util/lev_comp Arch.des
../util/lev_comp Barb.des
../util/lev_comp Caveman.des
../util/lev_comp Healer.des
../util/lev_comp Knight.des
../util/lev_comp Monk.des
../util/lev_comp Priest.des
../util/lev_comp Ranger.des
../util/lev_comp Rogue.des
../util/lev_comp Samurai.des
../util/lev_comp Tourist.des
../util/lev_comp Valkyrie.des
../util/lev_comp Wizard.des
cp *.lev %OPTWARE_TARGET_PREFIX%/share/nethackdir/
cp dungeon %OPTWARE_TARGET_PREFIX%/share/nethackdir/dungeon
cd %OPTWARE_TARGET_PREFIX%/share/nethackdir/util
./makedefs -q
cp %OPTWARE_TARGET_PREFIX%/share/nethackdir/dat/quest.dat %OPTWARE_TARGET_PREFIX%/share/nethackdir/quest.dat
#
# This should be solved with a sgid games!
#
chmod 777 %OPTWARE_TARGET_PREFIX%/share/nethackdir
chmod 777 %OPTWARE_TARGET_PREFIX%/share/nethackdir/record
chmod 777 %OPTWARE_TARGET_PREFIX%/share/nethackdir/logfile
chmod 777 %OPTWARE_TARGET_PREFIX%/share/nethackdir/perm
chmod 1777 %OPTWARE_TARGET_PREFIX%/share/nethackdir/save
